package org.tigris.subversion.svnant.conditions;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.taskdefs.condition.ConditionBase;
import org.apache.tools.ant.types.Reference;
import org.tigris.subversion.svnant.SvnFacade;

public abstract class SvnCondition extends ConditionBase
  implements Condition
{
  private static final String MSG_DEPRECATION = "Deprecated attribute '%s'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead.";

  public void setRefid(Reference paramReference)
  {
    SvnFacade.setRefid(this, paramReference);
  }

  public void setUsername(String paramString)
  {
    warning("Deprecated attribute '%s'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead.", new Object[] { "username" });
    SvnFacade.setUsername(this, paramString);
  }

  public void setPassword(String paramString)
  {
    warning("Deprecated attribute '%s'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead.", new Object[] { "password" });
    SvnFacade.setPassword(this, paramString);
  }

  public void setJavahl(boolean paramBoolean)
  {
    warning("Deprecated attribute '%s'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead.", new Object[] { "javahl" });
    SvnFacade.setJavahl(this, paramBoolean);
  }

  public void setSvnkit(boolean paramBoolean)
  {
    warning("Deprecated attribute '%s'. This attribute will disappear with SVNANT 1.3.2. Use svnSetting instead.", new Object[] { "svnkit" });
    SvnFacade.setSvnKit(this, paramBoolean);
  }

  public boolean eval()
  {
    preconditions();
    return internalEval();
  }

  protected void preconditions()
    throws BuildException
  {
  }

  protected abstract boolean internalEval();

  private void warning(String paramString, Object[] paramArrayOfObject)
  {
    getProject().log(String.format(paramString, paramArrayOfObject), 1);
  }
}

/* Location:           C:\Users\Administrator\Desktop\svnant.jar
 * Qualified Name:     org.tigris.subversion.svnant.conditions.SvnCondition
 * JD-Core Version:    0.6.0
 */